// pages/home-sale/home-sale.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    allProducts: [
      { 
        id: '1', 
        name: '维嘟香蕉飞饼', 
        code: '编码:xjfb..80', 
        price: '500', 
        category: '1',
        image: '/images/food/product1.jpg'
      },
      { 
        id: '2', 
        name: '维嘟香葱豆沙饼', 
        code: '编码:xcfb..80', 
        price: '500', 
        category: '1',
        image: '/images/food/product2.jpg'
      },
      { 
        id: '3', 
        name: '蚝萃轩黄油酥筒', 
        code: '编码:hyst..80', 
        price: '360', 
        category: '1',
        image: '/images/food/product3.jpg'
      },
      { 
        id: '4', 
        name: '牛角包', 
        code: '编码:llfb..80', 
        price: '600', 
        category: '1',
        image: '/images/food/product4.jpg'
      },
      { 
        id: '5', 
        name: '漫竹沙华广式油条', 
        code: '编码:MZSHGSYT100', 
        price: '280', 
        category: '2',
        image: '/images/food/product5.jpg'
      },
      { 
        id: '6', 
        name: '金轮高筒蛋挞皮', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '2',
        image: '/images/food/product6.jpg'
      },
      { 
        id: '7', 
        name: '老干妈', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '2',
        image: '/images/food/product7.jpg'
      }
      ,
      { 
        id: '8', 
        name: '酸辣粉', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '3',
        image: '/images/food/product8.jpg'
      },
      { 
        id: '9', 
        name: '酸辣粉', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '4',
        image: '/images/food/product9.jpg'
      },
      { 
        id: '10', 
        name: '酸辣粉', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '5',
        image: '/images/food/product10.jpg'
      },
      { 
        id: '11', 
        name: '酸辣粉', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '6',
        image: '/images/food/product11.jpg'
      },
      { 
        id: '12', 
        name: '酸辣粉', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '7',
        image: '/images/food/product12.jpg'
      },
      { 
        id: '13', 
        name: '酸辣粉', 
        code: '编码:Z12...00100', 
        price: '100', 
        category: '8',
        image: '/images/food/product13.jpg'
      }
    ]
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad(options) {

  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady() {

  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow() {

  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide() {

  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload() {

  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh() {

  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom() {

  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage() {

  }
})